AppSeeder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 12
dl 0
loc 16
c 0
b 0
f 0
rs 10

1 Function

Rating   Name   Duplication   Size   Complexity  
A run 0 14 1
1
import { Seeder } from '@concepta/typeorm-seeding';
2
import { User } from 'src/Domain/HumanResource/User/User.entity';
3
import { UserFactory } from '../Factories/UserFactory';
4
5
import { UserSeeder } from './UserSeeder';
6
import { CustomerSeeder } from './CustomerSeeder';
7
import { CustomerFactory } from '../Factories/CustomerFactory';
8
9
export class AppSeeder extends Seeder {
10
  async run() {
11
    const userSeeder = new UserSeeder({
12
      factories: [
13
        new UserFactory({
14
          entity: User
15
        })
16
      ]
17
    });
18
19
    const customerSeeder = new CustomerSeeder({
20
      factories: [new CustomerFactory()]
21
    });
22
23
    await this.call([userSeeder, customerSeeder]);
24
  }
25
}
26